﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="cadastroSessaoTeste2.aspx.cs" Inherits="cadastroSessaoTeste2" Title="Cadastro de sessão de teste - Platinum Project - Projeto 2" %>
<%@ Register Src="tabelaCadastros.ascx" TagName="tabelaCadastros" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript">

function SelectAllCheckboxes(spanChk){

// Added as ASPX uses SPAN for checkbox

var oItem = spanChk.children;

var theBox=(spanChk.type=="checkbox")?spanChk:spanChk.children.item[0];

xState=theBox.checked;

elm=theBox.form.elements;

for(i=0;i<elm.length;i++)

if(elm[i].type=="checkbox" && elm[i].id!=theBox.id)

{

//elm[i].click();

if(elm[i].checked!=xState)

elm[i].click();

//elm[i].checked=xState;

}

}

    </script>
    <asp:ScriptManager id="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <cc1:TabContainer ID="TabContainer1" runat="server">
        <cc1:TabPanel ID="TabPanelPaginaInicial" runat="server" HeaderText="Página Inicial">
            <HeaderTemplate>
                <asp:HyperLink ID="HyperLink2" runat="server" Font-Bold="True" Font-Names="Verdana"
                    Font-Size="Small" NavigateUrl="inicio.aspx">Início</asp:HyperLink>
            </HeaderTemplate>
            <ContentTemplate>
                <asp:Label ID="LabelDescricao" runat="server" Font-Names="Verdana" Font-Size="Small"
                    Text="Bem vindo ao Platinum Test,  um portal para a execução de testes de usabilidade."></asp:Label>
            </ContentTemplate>
        </cc1:TabPanel>
        <cc1:TabPanel ID="TabPanelCadastros" runat="server" HeaderText="Cadastros">
            <HeaderTemplate>
                <asp:HyperLink ID="HyperLink1" runat="server" Font-Bold="True" Font-Names="Verdana"
                    Font-Size="Small" NavigateUrl="cadastros.aspx">Cadastro</asp:HyperLink>
            </HeaderTemplate>
            <ContentTemplate>
                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
            <tr>
                <td style="width: 200px" valign="top">
    <uc1:tabelaCadastros ID="TabelaCadastros1" runat="server" />
                </td>
                <td>
                    <span style="font-size: 1em; font-family: Verdana">&nbsp;<asp:UpdatePanel id="UpdatePanel1"
                        runat="server"><contenttemplate>
&nbsp; <TABLE><TBODY><TR><TD style="WIDTH: 100px"><asp:Label id="Label1" runat="server" Width="439px" Text="Cadastro de sessão de teste" Font-Size="Medium" Font-Names="Verdana" Font-Bold="True"></asp:Label></TD></TR><TR><TD style="WIDTH: 100px"><asp:Label id="Label2" runat="server" Width="385px" Text="2º Passo - associação de participantes de teste" Font-Size="Small" Font-Names="Verdana" Font-Bold="True"></asp:Label></TD></TR><TR><TD style="WIDTH: 100px"></TD></TR><TR><TD style="WIDTH: 100px"><asp:GridView id="GridView1" runat="server" Font-Size="Small" Font-Names="Verdana" ForeColor="#333333" DataSourceID="ObjectDataSource1" OnRowCommand="GridView1_RowCommand" AutoGenerateColumns="False" AllowSorting="True" AllowPaging="True" GridLines="None" CellPadding="4">
<FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True"></FooterStyle>
<Columns>
<asp:TemplateField><EditItemTemplate>
<asp:CheckBox runat="server" id="CheckBox1"></asp:CheckBox>
</EditItemTemplate>
<HeaderTemplate>
<input id="Checkbox2" runat="server" onclick="javascript:SelectAllCheckboxes(this);"
                                        type="checkbox" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox id="CheckBoxUsuarioSessao" runat="server"></asp:CheckBox> 
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="False" ShowHeader="False"><ItemTemplate>
<asp:LinkButton id="LinkButton1" runat="server" Text="Editar" CausesValidation="False" CommandName="editarUsuarioSessao" CommandArgument='<%# Eval("id") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField Visible="False" SelectText="Detalhes" ShowSelectButton="True"></asp:CommandField>
<asp:BoundField DataField="nome" HeaderText="Nome"></asp:BoundField>
<asp:BoundField DataField="idade" HeaderText="Idade"></asp:BoundField>
<asp:BoundField DataField="sexo" HeaderText="Sexo"></asp:BoundField>
<asp:BoundField DataField="experiencia" HeaderText="Experi&#234;ncia"></asp:BoundField>
</Columns>

<RowStyle BackColor="#F7F6F3" ForeColor="#333333"></RowStyle>

<EditRowStyle BackColor="#999999"></EditRowStyle>

<SelectedRowStyle BackColor="#E2DED6" ForeColor="#333333" Font-Bold="True"></SelectedRowStyle>

<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></PagerStyle>

<HeaderStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True"></HeaderStyle>

<AlternatingRowStyle BackColor="White" ForeColor="#284775"></AlternatingRowStyle>
</asp:GridView></TD></TR><TR><TD style="WIDTH: 100px"><asp:Button id="ButtonRemover" tabIndex=1 onclick="ButtonRemover_Click" runat="server" Width="350px" Text="Associar participantes de teste  selecionados" Font-Size="Small" Font-Names="Verdana"></asp:Button></TD></TR></TBODY></TABLE><asp:GridView id="GridView2" runat="server" DataSourceID="ObjectDataSource1" AutoGenerateColumns="False" Visible="False"><Columns>
<asp:BoundField DataField="id" HeaderText="ID"></asp:BoundField>
</Columns>
</asp:GridView><BR /><asp:ObjectDataSource id="ObjectDataSource1" runat="server" TypeName="FacadeService" SelectMethod="GetUsuariosDeTeste"></asp:ObjectDataSource> 
</contenttemplate>
                    </asp:UpdatePanel></span></td>
            </tr>
        </table>
            </ContentTemplate>
        </cc1:TabPanel>
        <cc1:TabPanel ID="TabPanelConsultas" runat="server" HeaderText="Consultas">
            <HeaderTemplate>
                <asp:HyperLink ID="HyperLink3" runat="server" Font-Bold="True" Font-Names="Verdana"
                    Font-Size="Small" NavigateUrl="consultas.aspx">Consulta</asp:HyperLink>
            </HeaderTemplate>
            <ContentTemplate>
                
            </ContentTemplate>
        </cc1:TabPanel>
        <cc1:TabPanel ID="TabPanelExecucaoTestes" runat="server" HeaderText="Execução de testes"
            Enabled="false">
        </cc1:TabPanel>
    </cc1:TabContainer>
    
</asp:Content>


